home *** CD-ROM | disk | FTP | other *** search
/ Aminet 5 / Aminet 5 - March 1995.iso / Aminet / text / misc / pcal_4_5.lha / pcal / Pcal.hlp < prev    next >
Text File  |  1994-10-16  |  32KB  |  708 lines

  1. 1 PCAL
  2.         Pcal generates PostScript  to  produce  landscape  or portrait
  3.     calendars for any month  and  year.  The arguments month,year, and
  4.     nmonths, if provided, should be  numeric.   The month value should
  5.     be in the range 1 -  12, and the year value should be specified as
  6.     1  or 2 digits or as the  full  4  digit  year.    If  no  numeric
  7.     arguments  are  provided, the calendar for the current  month  and
  8.     year will be generated.
  9.  
  10.         If one  numeric argument is provided, it is interpreted as the
  11.     year value, and  calendars  for the entire year will be generated.
  12.     Otherwise, nmonths months, starting  with  month and year, will be
  13.     generated.
  14.  
  15.         For whole-year calendars (i.e.  the  -w  option is given), the
  16.     command line arguments are interpreted somewhat differently.    By
  17.     default, all months in the current year are printed, starting with
  18.     January.  If the month argument alone is given,  it is expected to
  19.     be the desired year to print, and prints all of  the months in the
  20.     given year.  If both month and year are given, then 12 consecutive
  21.     months  are printed starting at the given month and year.  If  the
  22.     month,  year, and nmonths  arguments  are  all  present,  printing
  23.     begins  with the given month  and  year  and  nmonths  months  are
  24.     printed, rounded up to the nearest multiple of 12.
  25.  
  26.         VMS Version
  27.         Execution format:
  28.  
  29.             pcal [options] [mm yy] [n]
  30.  
  31. 2 Parameters
  32.   mm yy n
  33.         "mm" and "yy"  are numeric values of the month (1-12) and year
  34.     (0-99) (i.e., July 1990  would  be 7 90).  If you just include the
  35.     "yy" option, an entire 12  months  of calendars will be generated.
  36.     A specific month can be produced  by including the "mm" parameter.
  37.     The  "n"  parameter will  produce the "n"  consecutive  months  of
  38.     calendars starting with the requested month.
  39.  
  40.         The following flags may  be  specified (in increasing order of
  41.     precedence) in global symbol PCAL_OPTS, in "opt" lines in the date
  42.     file (all but -c, -e, -f,  -h,  -u,  -v,  -"D",  -"U"),  or on the
  43.     command line.  Any flag which normally  takes  an  argument may be
  44.     specified  without  the argument;  this resets its  value  to  the
  45.     program  default.    (-"D" alone thus clears all defined  symbols;
  46.     -"U" alone has no effect.)
  47.  
  48.         The "-" flag has  been added to  disambiguate  cases  where an
  49.     argument-less flag has been specified immediately before a numeric
  50.     parameter:
  51.  
  52.         pcal -t - 9 90
  53.  
  54. 2 Options
  55.         Pcal  accepts  several  command  line  options  (or  from  the
  56.     CALENDAR.DAT file).  The uppercase options  should  be enclosed in
  57.     quotes as pcal is case-sensitive and the  VMS  command line parser
  58.     will  convert  the  string to upper case otherwise.    The  quoted
  59.     strings  are  not  needed if the options are included  within  the
  60.     CALENDAR.DAT file.
  61.  
  62. 3 -e
  63.         Print an  empty  calendar (i.e., do not  print entries  from a
  64.     CALENDAR.DAT file.)
  65.  
  66. 3 -f <FILE>
  67.         Directs pcal to use the file name <FILE> as  the input file in
  68.     place  of  the  default  CALENDAR.DAT file.  Note that the  search
  69.     rules are  different  when  -f  is used.  If <FILE> is an absolute
  70.     file name, then  pcal attempts to open only that file.  Otherwise,
  71.     pcal looks for <FILE>  in  the  current  directory,  then  in  the
  72.     directory  indicated  by  the environment  variable  PCAL_DIR  (if
  73.     defined), and finally in the directory  where  the pcal executable
  74.     resides.  If the given <FILE> file is not found, an error results.
  75.  
  76. 3 -o <FILE>
  77.         Directs  pcal to  write  the  PostScript  calendar  into  FILE
  78.     (default: CALENDAR.PS in the current directory.)
  79.  
  80. 3 -l
  81.         This will cause the  output to  come  out  in  landscape  mode
  82.     (This is the default).  This also resets the x- and y-axis scaling
  83.     and translation factors to the defaults for landscape mode.
  84.  
  85. 3 -p
  86.         This will cause the  output  to  come  out  in  portrait  mode
  87.     instead of landscape mode.   This  also  resets  the x- and y-axis
  88.     scaling and translation factors to the defaults for portrait mode.
  89.  
  90. 3 -j
  91.         Directs pcal to print  the  Julian  (Day Of Year, DOY) in each
  92.     calendar box.
  93.  
  94. 3 -"J"
  95.         Directs pcal to print the Julian  (Day  Of  Year, DOY) and the
  96.     number of days remaining in the year in each calendar box.
  97.  
  98. 3 -m
  99.         This option causes a  moon to be printed on days corresponding
  100.     to a full, half, or new moon (default: no moons).
  101.  
  102. 3 -"M"
  103.         This option causes a fractional moon to be printed on all days
  104.     (default:  no moons).
  105.  
  106. 3 -g day1[-day2] | all | holiday
  107.         Causes  all  dates falling on weekday day1  (through  day2  if
  108.     specified)  to be printed in gray;  -g  all  causes  all  weekdays
  109.     (other than holidays) to be printed in gray;   -g  holiday  causes
  110.     all holidays to be printed in gray.  day1 and day2 may wrap around
  111.     weekends;   for example, -g fri-sun causes Fridays, Saturdays, and
  112.     Sundays to be printed in gray.
  113.  
  114. 3 -"O"
  115.         Causes "gray" dates to be printed as outlined characters.
  116.  
  117. 3 -"G" day1[-day2] | all | holiday
  118.         Similar to -g,  but  the  selected  days  will  be  printed as
  119.     outlined characters filled with gray.
  120.  
  121.         Note:    The  default  for  the  above  options  is  to  print
  122.     Saturdays,  Sundays, and holidays in gray and all  other  days  in
  123.     black.  For backward compatibility with earlier versions of  pcal,
  124.     -"O"  and  -"G" alone change all non-black days to the  specified
  125.     color.
  126.  
  127. 3 -b day1[-day2] | all | holiday
  128.         Similar to - you guessed it - -g, but the selected  days  will
  129.     be printed in black.  Since black is the default for weekdays,  -b
  130.     is primarily  used  to  overriding  other  flags  (e.g., -g all -b
  131.     sat-sun ).
  132.  
  133. 3 -s <date_shade>[/fill_shade]
  134.         Overrides the default values for date and/or fill box shading.
  135.     These values must be in the range 0.0 (black) through 1.0 (white);
  136.     they may be set independently of  each  other.  The default values
  137.     are 0.8 for dates and 0.9 for empty boxes.
  138.  
  139.          Note:  For use with color printers, date_shade and fill_shade
  140.     may  optionally  be specified as a set of  red:green:blue  values;
  141.     red, blue, and green must in the range 0.0  through 1.0.  At least
  142.     one ':' must be present for this option to be recognized;  omitted
  143.     values are set to 0.0.
  144.  
  145.  
  146. 3 -"F" <DAY>
  147.         Selects weekday DAY as the first  day  of the week.  The given
  148.     day will appear in the left-most column of the calendar.
  149.  
  150. 3 -"A"
  151.         Directs pcal to use American date conventions "mm/dd[/yy]" and
  152.     "month dd" when parsing the date file (default).
  153.  
  154. 3 -"E"
  155.         Directs pcal to use European date conventions "dd/mm[/yy]" and
  156.     "dd month" when parsing the date file.
  157.  
  158. 3 -"X" xtrans
  159.         Specifies  the  x-axis  translation  value for positioning the
  160.     output on the page.
  161.  
  162. 3 -"Y" ytrans
  163.         Specifies  the  y-axis  translation  value for positioning the
  164.     output on the page.
  165.  
  166. 3 -x xscale
  167.         Specifies the x-axis scaling factor for the calendar size.
  168.  
  169. 3 -y yscale
  170.         Specifies the y-axis scaling factor for the calendar size.
  171.  
  172. 3 -t <title_font>[/size]
  173.         Specifies  the name of a font to use to print all the calendar
  174.     heading text:  the month name and year at the top of the calendar,
  175.     the weekday  names, the notes  box heading, and the  foot strings.
  176.     The user may optionally  specify the font  size for the month/year
  177.     heading  (single-month  calendar  only);   for  example,  pcal  -t
  178.     Times-Roman/54  sets  the font  to Times-Roman  and the month/year
  179.     point size to 54.  The font size may also be changed independently:
  180.     pcal -t /54 changes the point size to 54 without affecting the font
  181.     name.
  182.  
  183. 3 -d <date_font>[/size]
  184.         Similar  to  the  -t  option, but selects the font and/or size
  185.     used to print the dates.
  186.  
  187. 3 -n <text_font>[/size]
  188.         Similar  to the -t and -d options, but selects the font and/or
  189.     size  used  to  print the text associated with each day and in the
  190.     "Notes" blocks.
  191.  
  192. 3 -r <mapping>
  193.         Specifies an 8-bit character set  remapping  for  printing the
  194.     diacritical marks common to European languages;    mapping  may be
  195.     "Roman8"  (ROMAN-8 extended character set), "Latin1" (ISO  LATIN-1
  196.     extended character set), or "none" (builtin 8-bit mappings  only).
  197.     It may be abbreviated to a single character if desired.
  198.  
  199. 3 -"D" <SYMBOL>
  200.         Defines the named SYMBOL prior to reading the date file.
  201.  
  202. 3 -"U" <SYMBOL>
  203.         Un-Defines the named SYMBOL prior to reading the date file.
  204.  
  205. 3 -"L" <STRING>
  206.         Causes   the  accompanying  string  to  be  printed    as    a
  207.     left-justified  footer.    Format  specifiers  denoting  the month
  208.     and/or year may appear in the string;  the appropriate values will
  209.     be substituted upon printing.
  210.  
  211. 3 -"C" <STRING>
  212.         Similar to -"L", but  causes  the  accompanying  string  to be
  213.     printed as a centered footer.
  214.  
  215. 3 -"R" <STRING>
  216.         Similar to -"L", but  causes  the  accompanying  string  to be
  217.     printed as a right-justified footer.
  218.  
  219. 3 -"N" <STRING>
  220.         Caused the accompanying string to  be  printed  as the heading
  221.     for the "Notes" box.  Note  however, that pcal makes no attempt to
  222.     ensure that it fits.
  223.  
  224. 3 -"B"
  225.         Causes pcal to leave  unused  calendar boxes blank (default is
  226.     gray).
  227.  
  228. 3 -# n
  229.         Causes pcal to print n copies (maximum:  100)  of  each output
  230.     page.
  231.  
  232.  
  233. 3 -"S"
  234.         Causes pcal to suppress printing the small calendars.  See the
  235.     CAVEATS section for further details.
  236.  
  237. 3 -k
  238.         Causes  pcal to print the small calendars in  the  upper  left
  239.     corner (the default is to print them at the lower right).
  240.  
  241. 3 -"K"
  242.         Causes pcal to print the small calendar for the previous month
  243.     in  the upper left corner and the next month in  the  lower  right
  244.     (the default is to print both at the lower right).
  245.  
  246. 3 -w
  247.         Causes pcal  to print a calendar for 12 consecutive months:  3
  248.     rows / 4 columns in landscape mode, 4 rows / 3 columns in portrait
  249.     mode.  See the CAVEATS section for details  on  the  use  of  this
  250.     option with other options.
  251.  
  252. 3 -c
  253.         Causes pcal to generate a date file suitable for use as  input
  254.     to the Un*x  "calendar(1)"  utility.  The normal PostScript output
  255.     is suppressed.
  256.  
  257. 3 -z <time_zone>
  258.         Forces pcal to  ignore  the  moon file and to use its internal
  259.     algorithm for moon phase  calculations,  adjusting  the  phase  by
  260.     time_zone hours (where time_zone is  expressed  in  hours  west of
  261.     UTC).
  262.  
  263. 3 -"I"
  264.         Resets all parameters to the program defaults.
  265.  
  266. 3 -h
  267.         Causes  pcal to write  version  information,  parameter  usage
  268.     message, and full explanation of  options  and  file  formats  (to
  269.     stdout) and terminate.
  270.  
  271. 3 -u
  272.         Causes pcal to write version information  and  parameter usage
  273.     message (to stdout) and terminate.
  274.  
  275. 3 -v
  276.         This prints version information only.
  277.  
  278. 2 Date_File
  279.         By default,  pcal  simply  prints an empty calendar.  Its real
  280.     power is in  its  ability to place "events" in appropriate days on
  281.     the  calendar,  thus allowing  the  user  to  create  personalized
  282.     calendars.  This is achieved through the use of the "date file".
  283.  
  284.         The  date  file  is  named  CALENDAR.DAT.   Pcal will look  in
  285.     several  places  for  such  a  file.    First,  if the environment
  286.     variable  PCAL_DIR    is  defined,  pcal  searches  the  directory
  287.     indicated by that  variable.   Next, pcal searches the user's home
  288.     directory (as specified by  the  HOME  environment  variable).  If
  289.     neither PCAL_DIR nor HOME is  defined,  pcal  searches the current
  290.     directory  instead.    Finally,  the  directory   where  the  pcal
  291.     executable resides will be checked.  If  no date file is found, an
  292.     empty calendar is printed;  no error is generated.
  293.      
  294.         If  a  date file is found, it will be searched for lines  with
  295.     leading dates matching  the  requested  month  and year.  Any text
  296.     following the dates found  will  be  printed on the calendar under
  297.     the appropriate day of the  month.  Dates in the CALENDAR.DAT file
  298.     may be expressed in any of several formats:
  299.  
  300.           <ordinal> <day_spec> in <month_spec>[*] [<text>]
  301.           [<ordinal>] <day_spec> <prep> <date_spec>[*] [<text>]
  302.           <date_spec>[*] [<text>]
  303.           <holiday>
  304.  
  305.     Where:
  306.  
  307.       <month_name> := first 3+ characters of name of month, or "all"
  308.       <month_spec>  := <month_name>, or "year"
  309.       <day_spec>    := first 3+ characters of name of weekday, "day",
  310.                        "weekday", "workday", "holiday",
  311.                        "nonweekday", "nonworkday", "nonholiday", "new_moon",
  312.                        "first_quarter", "full_moon", or "last_quarter"
  313.       <ordinal>     := any ordinal number "first", "1st", ... "fifth", "5th",
  314.                        "last", "odd", "even", or "all"
  315.       <prep>        := "before", "preceding", "after", "following",
  316.                        "on_or_before" ("oob"), or
  317.                        "on_or_after" ("ooa")
  318.       <holiday>     := "Christmas", "Thanksgiving", etc.
  319.       <sep>         := 1 or more non-numeric, non-space, non-"*" characters
  320.       <month>       := day of month (1-31)
  321.       <day>         := a numeric month (1-12)
  322.       <year>        := a numeric year
  323.  
  324.      If the -"A" option (American date formats, the default) is given:
  325.  
  326.       <date_spec>   := <month_name><day> | <month><sep><day>[<sep><year>]
  327.  
  328.      If the -"E" option (European date formats) is given:
  329.  
  330.       <date_spec>   := <day><month_name> | <day><sep><month>[<sep><year>]
  331.  
  332. 3 Text_Format_Description
  333.         Pcal also allows format specifiers  in  both the text and foot
  334.     strings (see the -L, -C, -R, and -N options  below);  each will be
  335.     replaced by a corresponding string as outlined in the table below.
  336.     Most  of  these  are  derived from the ANSI C strftime() function;
  337.     the %[louwMD] and %[o0+\-] format specifiers are specific to pcal:
  338.  
  339.                 %a     abbreviated weekday
  340.                 %A     full weekday
  341.                 %b     abbreviated month name
  342.                 %B     full month name
  343.                 %d     day of month (1-31)
  344.                 %j     day of year (1-366)
  345.                 %l     days left in year (0-365)
  346.                 %m     month (1-12)
  347.                 %U     week number (0-53)
  348.                 %W     week number (0-53)
  349.                 %u     week number (1-54)
  350.                 %w     week number (1-54)
  351.                 %y     year w/o century (00-99)
  352.                 %Y     year w/century
  353.                 %%     % character
  354.  
  355.                 %o     print number as ordinal
  356.                 %0     print number with leading zeroes
  357.                 %+     use following month or year
  358.                 %-     use previous month or year
  359.                 %{+N}[DWMY]     adjust date by +N days/weeks/months/years
  360.                 %{\-N}[DWMY]    adjust date by \-N days/weeks/months/years
  361.  
  362.         %u  specifier  considers the week containing 1/1 as week 1 and
  363.     the following  logical  Sunday  (the  first  day  of  the  week as
  364.     printed;  cf.    the \-F option below) as the start of week 2;  %U
  365.     considers the first logical Sunday as the first day of week 1.  %w
  366.     and %W behave like %u  and  %U  respectively,  but  use  the first
  367.     logical Monday instead.  Note that  %w  has a different meaning to
  368.     strftime().
  369.  
  370.         The %o format specifier prints a  number  as  an ordinal, with
  371.     the  appropriate  suffix ("st", "nd", "rd", or  "th"  in  English)
  372.     appended;  for example, %od prints the day  of the month as "1st",
  373.     "2nd", "3rd", etc.
  374.  
  375.         Unlike  strftime(), pcal defaults to printing numbers  (except
  376.     %y ) without leading zeroes.  If leading  zeroes  are desired, the
  377.     `0' prefix may be used.  For example, %0j  prints the first day of
  378.     year as "001".
  379.  
  380.         The %+ and %\- format specifiers direct pcal to substitute the
  381.     following/previous month/year in the  following [bBmyY] specifier.
  382.     For example, %+B prints the name of the next month.
  383.  
  384.         The %{[+\-]N}[DWMY] format specifiers do  not  print anything,
  385.     but instead adjust the working date  by \(+- N days ( D ), weeks (
  386.     W ), months ( M ), or  years  ( Y ).  Subsequent format specifiers
  387.     use the adjusted date instead of the current  date.   For example,
  388.     %+1M %B %Y adjusts the date forward by one  month  and then prints
  389.     the  resulting  month and year ("January 1992" in December, 1991);
  390.     %\-2W %b %d adjusts the date backward by two weeks and  prints the
  391.     resulting month and day ("Jul 26" on August 9).
  392.  
  393.         Such date adjustments are  normally  cumulative;  for example,
  394.     %+1Y%\-1D adjusts the date forward  by  one year and then backward
  395.     by one day.  If %D  or  %M  is  specified alone (or if N is zero),
  396.     pcal restores the original date.  Note  that  %M  has  a different
  397.     meaning to the strftime() function.
  398.  
  399.         The "Notes" box (see below) uses the first  of  the  current
  400.     month as the default date.  All foot strings  use the first of the
  401.     current  month in single-month mode and the first of the  starting
  402.     month in whole-year mode.
  403.  
  404. 3 Date_Syntax_Description
  405.         Any  non-numeric  character    may   separate  numeric  dates.
  406.     Holidays may be flagged by following the date immediately with "*"
  407.     as in the examples above;   this will cause the date to be printed
  408.     in gray.  "Each" and "every"  are  accepted as synonyms for "all",
  409.     and any word may be used in  place  of  "in".    The abbreviations
  410.     "oob"  and  "ooa"  may  be  used  in  place    of    the  keywords
  411.     "on_or_before"  and  "on_or_after",  respectively.       "Nearest"
  412.     attempts to match the specified date;  if that fails, it tries the
  413.     day after, then the day before,  then  two  days  after,  two days
  414.     before, and so forth until a match occurs.
  415.  
  416.         Wildcard day names are also provided.   The  keyword "weekday"
  417.     applies to any days which are normally printed  in  black  on  the
  418.     calendar.  The keyword "workday" is the same, but does not include
  419.     any  holidays.    The  keyword  "holiday" includes only those days
  420.     flagged as holidays.  The keywords "nonweekday", "nonworkday", and
  421.     "nonholiday" are also  recognized  as negations of the above.  See
  422.     the Caveats below for  important  notes  on  using these keywords.
  423.     Moon phases may also appear  as  wildcards;  "nm" is accepted as a
  424.     synonym for "new_moon", "1q" and "fq"  for  "first_quarter", "fm"'
  425.     for    "full_moon",  "3q"  for  "third_quarter",  and  "lq"    for
  426.     "last_quarter".
  427.  
  428.         Ordinal  day  numbers  may  be used to specify  dates,  either
  429.     relative to the month or to the year.   Either  words  or  numeric
  430.     abbreviations  may  be  used  for "first" through "fifth";  higher
  431.     numbers must  be given using the numeric equivalent (e.g.  100th).
  432.     Negative ordinal numbers  may  even  be used.  For example, "-2nd"
  433.     means "next to last".
  434.  
  435.         "Odd" and "even" do  not  refer  to the actual date;  instead,
  436.     "odd" means "alternate, starting with the first", and "even" means
  437.     "alternate,  starting with the second".   Thus,  "odd  Fridays  in
  438.     March" refers to the first, third, and  (if present) fifth Fridays
  439.     in March - not to those Fridays falling on odd dates.
  440.  
  441.         "All" refers to each individual month;  "year"  refers  to the
  442.     year as an entity.  Thus "odd Fridays in all" refers to the first,
  443.     third, and fifth Friday of each month, while "odd Fridays in year"
  444.     refers  to  the  first  Friday  of  January and every other Friday
  445.     thereafter.
  446.  
  447.         Text in the date file may use C-like escape sequences (i.e.  a
  448.     "\" followed by a character, 1--3 octal digits, or "x" followed by
  449.     1--2 hexadecimal  digits).  Escaped whitespace (including newline)
  450.     and the standard  ANSI  character escapes ("\a", "\b", "\f", "\n",
  451.     "\r", "\t", "\v") are all replaced by a single blank.
  452.  
  453.         Lines in the CALENDAR.DAT  file consisting of year #### (where
  454.     #### is a numeric year)  can be used to set the year for following
  455.     entries.  This assumes that the following entries do not contain a
  456.     year;  any date entries containing year  information  will set the
  457.     remembered year to that year.
  458.  
  459.         Lines in the CALENDAR.DAT file consisting of opt <options> can
  460.     be  used  to  override  the defaults for any command-line  options
  461.     except -e, -f, -h, -"D", and -"U".  Any options  specified in this
  462.     manner  are,  in turn, overridden by those specified explicitly on
  463.     the command  line.  Note that the upper case letter options do NOT
  464.     need to be  enclosed in quotes if they are put in the CALENDAR.DAT
  465.     file.  Enclose the upper case letters in quotes only when they are
  466.     used on the DCL.
  467.  
  468.         Lines in the CALENDAR.DAT file  consisting of note [/<number>]
  469.     <month> can be used to place  notes  regarding the entire month is
  470.     one of the unused blocks of the  calendar.   The <month> indicator
  471.     may be either a number 1 through 12 or an alphabetic month name as
  472.     described above;  "note all" will place the associated text in the
  473.     notes block for each month in the current year.   <number>  is  an
  474.     optional positive  or  negative  number  specifying  the empty box
  475.     where the associated  text  is  to  be  placed.  If positive, pcal
  476.     counts forward from the first empty box;  if negative, pcal counts
  477.     backward from the last empty  box.    Thus,  "note/1"  places  the
  478.     associated  text  in  the  first empty  box;    "note/-3"  in  the
  479.     third-to-last.  The default is -1 if  no  <number>  is given (last
  480.     empty box, immediately preceding the small calendars on the bottom
  481.     row;  cf.  \-S , \-k , and \-K , below).
  482.  
  483.         Comments   are  supported  in  the  CALENDAR.DAT  file.    Any
  484.     characters following  a  "#" character through the end of the line
  485.     are ignored (unless the `#' character is escaped by `\').
  486.  
  487.         Pcal supports rudimentary  cpp-like  functionality in the date
  488.     file,  allowing  the  following   constructs:    define  |  undef,
  489.     if{{n}def} ...  elif ...    *  else ...  endif, and include.  Note
  490.     that these are not preceded by "#" as they are in C.  Symbol names
  491.     defined  using  these  keywords  (or  via  the  -"D"  option)  are
  492.     case-insensitive.    It  is  not an error to  undef  an  undefined
  493.     symbol, nor to define a previously-defined one.  An ifdef alone is
  494.     always false;  an ifndef alone is always true.   if is accepted as
  495.     an synonym for ifdef.
  496.  
  497.         The  name  of the file in the include directive may optionally
  498.     be surrounded by either "" or <>, both of which are ignored.    If
  499.     the  name  is not an absolute path, it is taken to be relative  to
  500.     the directory where the file containing the directive is located.
  501.  
  502.         pcal normally terminates  immediately if the file specified in
  503.     an include directive does  not  exist.    An alternate form of the
  504.     directive, include?, directs pcal to continue silently if the file
  505.     does not exist or cannot be opened.
  506.  
  507.         In  addition  to  pre-processing keywords, pcal  also  accepts
  508.     boolean  expressions in if{{n}}def} and elif directives.     These
  509.     expressions  consist   of  symbol  names  joined  by  the  boolean
  510.     operators !, &,  ^,  and  |,  in order of precedence, high to low.
  511.     Parentheses may be used  to alter the precedence.  The synonyms &&
  512.     and || are accepted for  & and |.  A symbol name evaluates to true
  513.     if currently defined, false if not;  thus:
  514.  
  515.                               ifdef A | B | C
  516.  
  517.     ... is true if any of the symbols A, B, and C is defined, and:
  518.  
  519.                               ifdef A & B & C
  520.  
  521.     ...is true if they all are.  Note that ifndef <expr> is equivalent
  522.     to ifdef !( <expr> ).
  523.  
  524. 3 Example
  525.     Date File Example:
  526.  
  527.     # A sample "opt" line to change the fonts and output file names,
  528.     # to print only Sundays in gray, and to print moons on all days:
  529.     #
  530.     opt -d Helvetica-Bold -t Helvetica-Bold -o myfile.ps -b all -g sun -M
  531.  
  532.     year 1994               # set year explicitly
  533.     1/1*                    New Year's Day
  534.     ifndef Arizona
  535.         3rd Mon in Jan*     Martin Luther King's Birthday
  536.     endif
  537.     2/2                     Groundhog Day
  538.     Feb 14                  Valentine's Day
  539.     3rd Monday in Feb*      Presidents' Day
  540.     3/17                    St. Patrick's Day
  541.     last Monday in May*     Memorial Day
  542.     7/4*                    Independence Day
  543.     1st Monday in Sep*      Labor Day
  544.     second Monday in Oct*   Columbus Day (observed)
  545.     first workday in all    %-B progress report due
  546.     all Fridays in Oct      Status Meeting, 11 AM
  547.     all Fri in all          Time card due, 3 PM
  548.     all Monday in all       Fiscal week %0W
  549.     -2nd workday in all     Schedule for %+B due %+2D
  550.     2nd full_moon in all    Blue Moon
  551.     Fri on_or_before all 15 Pay Day
  552.     even Fridays in year    Pay Day
  553.     183rd day of year       Mid-year (%l days left)
  554.     10/12                   Columbus Day (traditional)
  555.     10/31                   Halloween
  556.     Tue after first Mon in Nov      Election Day
  557.     11/11*                          Veterans' Day
  558.     fourth Thu in Nov*              Thanksgiving
  559.     Fri after 4th Thu in Nov*       Day after Thanksgiving
  560.     day after fourth Thu in Nov*
  561.     12/25/94*               Christmas     # American
  562.     12/24*                  Christmas Eve
  563.     12/25*                  Christmas
  564.     25.12.94*               Christmas     # European
  565.     25. 12.*                Christmas     # European
  566.     25 Dec*                 Christmas     # European
  567.     25. Dec*                Christmas     # European
  568.  
  569.     workday nearest 12/25*  Holiday
  570.     last day in Dec*        New Year's Eve
  571.     last workday in all     Status reports due
  572.     note Dec                Office closed throughout week of Christmas
  573.     1/1/95*                 New Year's Day      # set new year implicitly
  574.  
  575. 2 Moon_File
  576.         If a file of the name MOON##.DAT (where  ##  is  the  last two
  577.     digits of the calendar year) exists in the same  directory  as the
  578.     date file (or in the directory where pcal resides) pcal  uses  the
  579.     information  contained  within to calculate the phase of the moon.
  580.     If no such file exists, pcal uses an extremely reliable algorithm.
  581.     This is the preferred method of use.
  582.  
  583.         Entries in the moon file must conform to the following syntax:
  584.  
  585.         If the -"A" option  (American  date  formats,  the default) is
  586.     given:
  587.  
  588.               <quarter> <month><sep><day> [<hour><sep><min>]
  589.  
  590.         If the -"E" option (European date formats) is given:
  591.  
  592.               <quarter> <day><sep><month> [<hour><sep><min>]
  593.  
  594.         Where:
  595.  
  596.             <quarter>   := "nm", "fq" or "1q", "fm", "3q" or "lq"
  597.                            (new moon,first quarter,full moon,last quarter)
  598.             <hour>      := number 0-23 (24-hour clock)
  599.             <min>       := number 0-59
  600.  
  601.         This file must contain entries for  all  quarter  moons in the
  602.     year, in chronological order;  if any errors are encountered, pcal
  603.     will revert to using its default algorithm.
  604.  
  605.         As in the date file, comments start with  "#"  and run through
  606.     end-of-line.
  607.  
  608.         The moon file may optionally contain an opt -A  or opt -E line
  609.     to specify the format of its own date entries independently of the
  610.     format  used in the date file.  No other flags are  legal  in  the
  611.     moon file.
  612.  
  613. 3 Example
  614.         The  following  is  a short example of an European style (-"E)
  615.     moon data  file.    It  is taken from the MOON91.DAT file supplied
  616.     with pcal.
  617.  
  618.         3q 01/07 13:37          # third quarter
  619.         nm 01/15 18:51          # new moon
  620.         1q 01/23 09:23          # first quarter
  621.         fm 01/30 01:10          # full moon
  622.  
  623. 2 Logical_Names
  624.         Pcal optionally uses two (2)  logical  names during execution.
  625.     A user may define them or let the administrator set them up.
  626.  
  627. 3 Pcal_Dir
  628.         Pcal logical name for the location  of the directory for input
  629.     and output files.  In this way,  a  user can over-ride the current
  630.     default  location for the source  of  the  CALENDAR.DAT input file
  631.     and the CALENDAR.PS output file.
  632.  
  633. 3 Pcal_Opts
  634.         Pcal  also  looks for a logical name "Pcal_Opts;  if  defined,
  635.     its contents  are  parsed  as command-line flags.  These over-ride
  636.     the program defaults,  but  are  over-ridden  by any specified via
  637.     "opt" lines in the date file or on the command line.  Example:
  638.  
  639.         Define Pcal_Opts "-n Helvetica -D meetings"     ! login.com
  640.         pcal -"U" meetings 9 90       ! un-define symbol at runtime
  641.  
  642. 2 Caveats
  643.         The "workday" and "holiday" keywords are aware  of  only those
  644.     holidays which have already been flagged at the  point  where they
  645.     appear.  For example, consider January 1990:
  646.  
  647.                         January 1990
  648.                      S  M Tu  W Th  F  S
  649.                         1  2  3  4  5  6
  650.                      7  8  9 10 11 12 13
  651.                     14 15 16 17 18 19 20
  652.                     21 22 23 24 25 26 27
  653.                     28 29 30 31
  654.  
  655.         If the CALENDAR.DAT file looked like this:
  656.  
  657.             workday on_or_before all 15         payday
  658.             3rd Mon in Jan*                     MLK day
  659.  
  660.     then Pcal would mark the 15th as "payday" since  at  that point in
  661.     the CALENDAR.DAT file it has no way of knowing that  January  15th
  662.     will  later  be  flagged  as  a  holiday.  If the two  lines  were
  663.     reversed, such that  the  holiday preceded the "workday" wildcard,
  664.     then Pcal would work  as  intended,  marking  instead  the 12th as
  665.     "payday".    Also, beware of  year  boundaries  which  affect  the
  666.     handling of all of the day  wildcard  keywords.  In general, it is
  667.     best to place monthly wildcards such as  the  example above at the
  668.     end of each year to achieve the desired effect.
  669.  
  670.         Only the positive  ordinals  may  be  used in conjunction with
  671.     prepositions (e.g., "fourth Sunday  before  12/25").  (It could be
  672.     argued that "last Sunday before  12/25"  should  be  accepted as a
  673.     synonym for "first Sunday before 12/25",  but then what does "last
  674.     Sunday after 12/25" mean?)
  675.  
  676.         When the -w and -p options are used together, pcal revises the
  677.     y-scale   factor  in  order  to  use  the  entire  portrait  page;
  678.     therefore, the user should avoid using use  the  -y using both the
  679.     -w and -p options.  Use of the  -w  option in any case effectively
  680.     disables the -m, -"M", -j, and -"J" options.
  681.  
  682.         The output of the -c option may be used as input to subsequent
  683.     runs  of  pcal.    Note,  however,  that  opt lines (except for an
  684.     automatic "opt  \-[A|E]" ), comments, "note" text, and ifdef'd-out
  685.     source will be lost.
  686.  
  687.         The  -S  option interacts with note[/<number>];  if  used,  it
  688.     should  be specified either on the command line or  prior  to  the
  689.     first note line in the date file.
  690.  
  691. 2 Authors
  692.         The  original  PostScript code to generate the  calendars  was
  693.     written  by Patrick Wood (Copyright (c) 1987 by  Patrick  Wood  of
  694.     Pipeline  Associates, Inc.), and authorized for modifica- tion and
  695.     redistribution.   The  calendar file inclusion code was originally
  696.     written in bs(1)  by  Bill  Vogel  of  AT&T.    Patrick's original
  697.     PostScript was modified and enhanced several times by others whose
  698.     names have regrettably  been  lost.    Ken Keirnan of Pacific Bell
  699.     assembled the original "C"  version  upon  which  this  is  based;
  700.     additional modifications and enhancements are  the  work of Joseph
  701.     P.  Larson, Ed Hand, Andrew  W.    Rogers,  Mark  Kantrowitz,  Joe
  702.     Brownlee, Jamie Zawinski, Richard L.  Dyson,  Bill  Hogsett, Floyd
  703.     Miller, Andy Fyfe, and Geoff Kuenning.
  704.  
  705. 2 Version
  706.         This help file  currently  reflects pcal v4.5 dated 6-OCT-1994
  707.     and was updated by Richard Dyson.
  708.